package com.ap.core.validation.message.rules;

import com.ap.core.message.managepayment.info.ConfirmPaymentRequestMessageInfo;
import com.ap.core.validation.message.info.MessageValidationInfo;
import com.ap.core.validation.message.info.RTPOriginalInfoForConfirmPayment;
import com.ap.core.validation.rules.AbstractValidationRule;

/**
 * User: Rohit.Dixit
 * The element <APTRId> The APTransactionRetrievalId should be an existing valid APTransactionRetrievalId, submitted in the Retrieve RTP MSG
 */
public class RV0010ConfirmPaymentRule extends AbstractValidationRule<MessageValidationInfo<ConfirmPaymentRequestMessageInfo, RTPOriginalInfoForConfirmPayment>> {


  

	@Override
	public boolean validate(
			MessageValidationInfo<ConfirmPaymentRequestMessageInfo, RTPOriginalInfoForConfirmPayment> infoObject) {
		
		   return infoObject.getBoundObject().getPaymtDetails().getApTRId().equals(infoObject.getOriginalInfo().getApTransactionRetrievalId().toString());
	}


}
